<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
  xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,user-scalable=no, initial-scale=1">
		<title>审批事项</title>
		<link rel="stylesheet" type="text/css" href="../static/azxcrm/css/wap/aui.css" th:href="@{/azxcrm/css/wap/aui.css}"/>
		<link rel="stylesheet" type="text/css" href="../static/azxcrm/css/wap/start.css" th:href="@{/azxcrm/css/wap/start.css}"/>
		<link rel="stylesheet" type="text/css" href="//at.alicdn.com/t/font_835360_5n3z54a5m1.css"/>
		        <script src="/azxcrm/js/wap/api.js" th:src="@{/azxcrm/js/wap/api.js}" type="text/javascript" charset="utf-8"></script>
        <script src="/azxcrm/js/wap/aui-tab.js" th:src="@{/azxcrm/js/wap/aui-tab.js}" type="text/javascript" charset="utf-8"></script>
		<script src="../static/azxcrm/js/wap/jquery-3.3.1.min.js" type="text/javascript" th:src="@{/azxcrm/js/wap/jquery-3.3.1.min.js}"
	    charset="utf-8"></script>
	</head>
	<body>
		<header class="aui-bar aui-bar-nav">
			 <a th:href="@{/wap/wapMy}"  class="aui-pull-left aui-btn">
	       		 <span class="iconfont icon-fanhui1">返回</span>
	    	</a>
		    <div class="aui-title">我发起的</div>
		</header>
		<div class="aui-tab aui-border-b" id="tab">
            <div class="aui-tab-item aui-active" tapmode="">审核中</div>
            <div class="aui-tab-item" tapmode="">审核通过</div>
            <div class="aui-tab-item" tapmode="">审核被拒</div>
        </div>
        <div class="aui-padded-5 " id="tab1-con">
           <div id="tab1-con1" class="ishide">
           		<section class="aui-grid aui-margin-b-15">
					<div class="aui-card-list" id="g-fq" th:each="workFlow:${workFlowApplyList}" th:if="${workFlow.status} == 'ing'">
						<a th:href="@{/wap/order/detailsOrder(applyId=${workFlow.applyId})}" th:if="${workFlow.note == '成单审批'}">
				        <div class="aui-card-list-header">
				            <div class="aui-name">
				            	<img src="../static/azxcrm/image/wap/orange.png" th:src="@{/azxcrm/image/wap/blue.png}">
				            	<span class="aui-text-danger">发起人：<span th:text="${workFlow.user.userName}"></span></span>
				            </div>
				            	<span class="aui-state pos-rel">
				            		 审批类型：<span th:if="${workFlow.note} == '成单审批'">成单</span>
				            	</span>
				        </div>
				        <div class="aui-card-list-content">
				            <ul class="aui-list aui-media-list">
				                <li class="aui-list-item aui-list-item-middle">
				                    <div class="aui-media-list-item-inner">				                      
				                        <div class="aui-list-item-inner">
				                            <div class="aui-list-item-text">
				                                <div class="aui-list-item-title aui-font-size-14">
				                                	<i class="radius"></i>
				                                	审批状态：<span th:if="${workFlow.status}=='ing'">审核中</span>
				                                </div>				                              
				                            </div>				                           
				                             <div class="aui-list-item-text">
				                                 <span>
				                                 	<img src="../static/azxcrm/image/wap/time.png" th:src="@{/azxcrm/image/wap/time.png}">
				                              		 发起时间:<span th:text="${workFlow.createTime}"></span>
				                                 </span>
				                            </div>
				                        </div>
				                    </div>
				                </li>
				             </ul>  
				         </div>
				        </a>
				       	<a th:href="@{/wap/order/askForOrder(applyId=${workFlow.applyId})}" th:if="${workFlow.note == '退单审批'}">
				        <div class="aui-card-list-header">
				            <div class="aui-name"><img src="../static/azxcrm/image/wap/blue.png" th:src="@{/azxcrm/image/wap/orange.png}">
				            <span class="aui-text-danger">发起人：<span th:text="${workFlow.user.userName}"></span></span></div>
				            <span class="aui-state pos-rel">
				            	     审批类型：<span th:if="${workFlow.note} == '退单审批'">退款</span>
				            </span>
				        </div>
				        <div class="aui-card-list-content">
				            <ul class="aui-list aui-media-list">
				                <li class="aui-list-item aui-list-item-middle">
				                    <div class="aui-media-list-item-inner">				                      
				                        <div class="aui-list-item-inner">
				                            <div class="aui-list-item-text">
				                                <div class="aui-list-item-title aui-font-size-14">
				                                	<i class="radius"></i>
				                                	审批状态：<span th:if="${workFlow.status}=='ing'">审核中</span>
				                                </div>				
				                            </div>				                           
				                             <div class="aui-list-item-text">
				                                 <div>
				                                 <img src="../static/azxcrm/image/wap/time.png" th:src="@{/azxcrm/image/wap/time.png}">
				                              		 发起时间:<span th:text="${workFlow.createTime}"></span>
				                                 </div>
				                             		
				                            </div>
				                        </div>
				                    </div>
				                </li>
				             </ul>  
				        </div>  
				        </a>     
			   		</div>
		       	</section> 
           </div>
           <!--审核完成 -->
           <div class="aui-hide ishide" id="tab1-con2">
               <section class="aui-grid aui-margin-b-15">
					<div class="aui-card-list" id="g-fq" th:each="workFlow:${workFlowApplyList}" th:if="${workFlow.status} == 'pass'">
						<a th:href="@{/wap/order/detailsOrder(applyId=${workFlow.applyId})}" th:if="${workFlow.note == '成单审批'}">
				        <div class="aui-card-list-header">
				            <div class="aui-name">
				            	<img src="../static/azxcrm/image/wap/orange.png" th:src="@{/azxcrm/image/wap/blue.png}">
				            	<span class="aui-text-danger">发起人：<span th:text="${workFlow.user.userName}"></span></span>
				            </div>
				            	<span class="aui-state pos-rel">
				            		 审批类型：<span th:if="${workFlow.note} == '成单审批'">成单</span>
				            	</span>
				        </div>
				        <div class="aui-card-list-content">
				            <ul class="aui-list aui-media-list">
				                <li class="aui-list-item aui-list-item-middle">
				                    <div class="aui-media-list-item-inner">				                      
				                        <div class="aui-list-item-inner">
				                            <div class="aui-list-item-text">
				                                <div class="aui-list-item-title aui-font-size-14">
				                                	<i class="radius"></i>
				                                	审批状态：<span th:if="${workFlow.status}=='pass'">审核通过</span>
				                                </div>				                              
				                            </div>				                           
				                             <div class="aui-list-item-text">
				                                 <span>
				                                 	<img src="../static/azxcrm/image/wap/time.png" th:src="@{/azxcrm/image/wap/time.png}">
				                              		 发起时间:<span th:text="${workFlow.createTime}"></span>
				                                 </span>
				                            </div>
				                        </div>
				                    </div>
				                </li>
				             </ul>  
				         </div>
				        </a>
				       	<a th:href="@{/wap/order/askForOrder(applyId=${workFlow.applyId})}" th:if="${workFlow.note == '退单审批'}">
				        <div class="aui-card-list-header">
				            <div class="aui-name"><img src="../static/azxcrm/image/wap/blue.png" th:src="@{/azxcrm/image/wap/orange.png}">
				            <span class="aui-text-danger">发起人：<span th:text="${workFlow.user.userName}"></span></span></div>
				            <span class="aui-state pos-rel">
				            	     审批类型：<span th:if="${workFlow.note} == '退单审批'">退款</span>
				            </span>
				        </div>
				        <div class="aui-card-list-content">
				            <ul class="aui-list aui-media-list">
				                <li class="aui-list-item aui-list-item-middle">
				                    <div class="aui-media-list-item-inner">				                      
				                        <div class="aui-list-item-inner">
				                            <div class="aui-list-item-text">
				                                <div class="aui-list-item-title aui-font-size-14">
				                                	<i class="radius"></i>
				                                	审批状态：<span th:if="${workFlow.status}=='pass'">审核通过</span>
				                                </div>				
				                            </div>				                           
				                             <div class="aui-list-item-text">
				                                 <div>
				                                 <img src="../static/azxcrm/image/wap/time.png" th:src="@{/azxcrm/image/wap/time.png}">
				                              		 发起时间:<span th:text="${workFlow.createTime}"></span>
				                                 </div>
				                             		
				                            </div>
				                        </div>
				                    </div>
				                </li>
				             </ul>  
				        </div>  
				        </a>     
			   		</div>
		       	</section> 
           </div>
           <div class="aui-hide ishide" id="tab1-con3">
             <section class="aui-grid aui-margin-b-15">
					<div class="aui-card-list" id="g-fq" th:each="workFlow:${workFlowApplyList}" th:if="${workFlow.status} == 'reject'">
						<a th:href="@{/wap/order/detailsOrder(applyId=${workFlow.applyId})}" th:if="${workFlow.note == '成单审批'}">
				        <div class="aui-card-list-header">
				            <div class="aui-name">
				            	<img src="../static/azxcrm/image/wap/orange.png" th:src="@{/azxcrm/image/wap/blue.png}">
				            	<span class="aui-text-danger">发起人：<span th:text="${workFlow.user.userName}"></span></span>
				            </div>
				            	<span class="aui-state pos-rel">
				            		 审批类型：<span th:if="${workFlow.note} == '成单审批'">成单</span>
				            	</span>
				        </div>
				        <div class="aui-card-list-content">
				            <ul class="aui-list aui-media-list">
				                <li class="aui-list-item aui-list-item-middle">
				                    <div class="aui-media-list-item-inner">				                      
				                        <div class="aui-list-item-inner">
				                            <div class="aui-list-item-text">
				                                <div class="aui-list-item-title aui-font-size-14">
				                                	<i class="radius"></i>
				                                	审批状态：<span th:if="${workFlow.status}=='reject'">审核被拒</span>
				                                </div>				                              
				                            </div>				                           
				                             <div class="aui-list-item-text">
				                                 <span>
				                                 	<img src="../static/azxcrm/image/wap/time.png" th:src="@{/azxcrm/image/wap/time.png}">
				                              		 发起时间:<span th:text="${workFlow.createTime}"></span>
				                                 </span>
				                            </div>
				                        </div>
				                    </div>
				                </li>
				             </ul>  
				         </div>
				        </a>
				       	<a th:href="@{/wap/order/askForOrder(applyId=${workFlow.applyId})}" th:if="${workFlow.note == '退单审批'}">
				        <div class="aui-card-list-header">
				            <div class="aui-name"><img src="../static/azxcrm/image/wap/blue.png" th:src="@{/azxcrm/image/wap/orange.png}">
				            <span class="aui-text-danger">发起人：<span th:text="${workFlow.user.userName}"></span></span></div>
				            <span class="aui-state pos-rel">
				            	     审批类型：<span th:if="${workFlow.note} == '退单审批'">退款</span>
				            </span>
				        </div>
				        <div class="aui-card-list-content">
				            <ul class="aui-list aui-media-list">
				                <li class="aui-list-item aui-list-item-middle">
				                    <div class="aui-media-list-item-inner">				                      
				                        <div class="aui-list-item-inner">
				                            <div class="aui-list-item-text">
				                                <div class="aui-list-item-title aui-font-size-14">
				                                	<i class="radius"></i>
				                                	审批状态：<span th:if="${workFlow.status}=='reject'">审核被拒</span>
				                                </div>				
				                            </div>				                           
				                             <div class="aui-list-item-text">
				                                 <div>
				                                 <img src="../static/azxcrm/image/wap/time.png" th:src="@{/azxcrm/image/wap/time.png}">
				                              		 发起时间:<span th:text="${workFlow.createTime}"></span>
				                                 </div>
				                             		
				                            </div>
				                        </div>
				                    </div>
				                </li>
				             </ul>  
				        </div>  
				        </a>     
			   		</div>
		       	</section>
           </div>
        </div>

	</body>
</html>
<script>
apiready = function(){api.parseTapmode();}
var tab = new auiTab({
    element: document.getElementById("tab"),

}, function(ret) {
    if (ret) {
        //定义获取对象的所有兄弟节点的函数，
        function siblings(elm) {
            var a = [];
            var p = elm.parentNode.children;
            for (var i = 0, pl = p.length; i < pl; i++) {
                if (p[i] !== elm) a.push(p[i]);
            }
            return a;
        }
       
        var index = ret.index;
        var activeC = document.getElementById("tab1-con" + index);
        activeC.className = "";
        for (var i = 0; i < siblings(activeC).length; i++) {
            siblings(activeC)[i].className = "aui-hide";
        }
    }
});
	var session = sessionStorage.getItem("order");  
	if(session!==null){				
		$('.aui-tab-item').removeClass('aui-active');
		$('.aui-tab-item').eq(session).addClass('aui-active');
		$('.ishide').addClass('aui-hide');
		$('.ishide').eq(session).removeClass('aui-hide');
	} 

</script>